Skip to content

test: add test suites for 9 remaining tool files#218

Merged
himerus merged 1 commit intodevfrom
feature/test-add-test-suites-for-remaining-9
Mar 26, 2026
Merged

test: add test suites for 9 remaining tool files#218
himerus merged 1 commit intodevfrom
feature/test-add-test-suites-for-remaining-9

Conversation

@himerus
Copy link
Copy Markdown
Contributor

@himerus himerus commented Mar 26, 2026

Summary

  • Creates 8 new test files in tests/tools/ for tool files with zero coverage
  • Each file covers: getTools() definitions, happy path calls, error cases, and edge cases
  • Follows established patterns from existing scaffold.test.ts, bundle.test.ts, theme.test.ts

Files Added

  • tests/tools/cdn.test.ts — cdn tool: schema defaults, invalid registry, missing package
  • tests/tools/composition.test.ts — composition tool: 1–4 tagNames valid range, boundary errors
  • tests/tools/framework.test.ts — framework tool: detect_framework with empty/extra args, handler errors
  • tests/tools/story.test.ts — story tool: tagName found/not found, empty CEM, multi-module
  • tests/tools/tokens.test.ts — tokens tool: category filter, find_token, missing query, unconfigured tokensPath
  • tests/tools/typegenerate.test.ts — typegenerate tool: empty/multi-module CEM, component count, libraryId
  • tests/tools/typescript.test.ts — typescript tool: filePath validation, path traversal rejection, project diagnostics
  • tests/tools/validate.test.ts — validate tool: valid HTML, oversized HTML rejection, missing required args

Test plan

  • CI passes all new tests
  • No regressions in existing test suites

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 26, 2026

Warning

Rate limit exceeded

@himerus has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 56 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0dc5b2b8-a745-47d1-9320-d0142d68426d

📥 Commits

Reviewing files that changed from the base of the PR and between fa8b4c6 and 0508d52.

📒 Files selected for processing (8)
  • tests/tools/cdn.test.ts
  • tests/tools/composition.test.ts
  • tests/tools/framework.test.ts
  • tests/tools/story.test.ts
  • tests/tools/tokens.test.ts
  • tests/tools/typegenerate.test.ts
  • tests/tools/typescript.test.ts
  • tests/tools/validate.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/test-add-test-suites-for-remaining-9

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

… typegenerate, typescript, and validate tools

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@himerus himerus force-pushed the feature/test-add-test-suites-for-remaining-9 branch from a291712 to 0508d52 Compare March 26, 2026 22:12
@himerus himerus merged commit 37eca94 into dev Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant